package JavaDowork.pratice3;

import java.util.Scanner;

public class Q7s2 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入n：");
        int n = scanner.nextInt();
        int factorial = 1;
        // do-while
        int i = 1;
        do {
            factorial *= i;
            i++;
        } while (i <= n);
        System.out.println(n + "的阶乘是：" + factorial);
    }
}

